package com.imooc.mybatisplusappdemo.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.imooc.mybatisplusappdemo.dto.LoginDto;
import com.imooc.mybatisplusappdemo.entity.Account;
import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.mybatisplusappdemo.entity.Resource;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 账号表 服务类
 * </p>
 *
 * @author sanchongmen
 * @since 2021-03-22
 */
public interface AccountService extends IService<Account> {

  LoginDto login(String username, String password);

  /**
   * 分页查询账号
   * @param page
   * @param wrapper
   * @return
   */
  IPage<Account> accountPage(Page<Account> page, Wrapper<Account> wrapper);

  /**
   * 根据id获取账号信息
   * @param id
   * @return
   */
  Account getAccountById(long id);

}
